<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>

<body>
  <script>
    class Person {
      constructor() {
        this.sex = '男'
      }
    }
    class XiaoMing extends Person {
      constructor(name, age) {
        super()
        this.name = name;
        this.age = age
      }
    }
    let ming = new XiaoMing('小明', 20)
    console.log(ming)
    class XiaoLi extends Person {
      constructor(name, age) {
        super()
        this.name = name;
        this.age = age
      }
    }
    let li = new XiaoLi('小丽', 22)
    console.log(li)
  </script>
</body>

</html>